package org.jsemantic.servicerules.examples.even;

import java.util.Collection;

import org.jsemantic.core.session.SemanticSession;
import org.jsemantic.core.session.factory.SemanticSessionFactory;

public class EvenService {

	private SemanticSessionFactory semanticSessionFactory = null;

	public Collection check(Collection numbers) {
		SemanticSession session = semanticSessionFactory.getInstance();

		Collection results = session.execute(numbers);

		session.dispose();
		session = null;

		return results;
	}

	public void setSemanticSessionFactory(
			SemanticSessionFactory semanticSessionFactory) {
		this.semanticSessionFactory = semanticSessionFactory;
	}

}
